Japanese Patent Laid-Open No. 4-267211 discloses a solid-state image pickup device which functions as an image pickup element and in which pixels are two-dimensionally arranged. The pixels include microlenses and photoelectric conversion units that are relatively displaced from each other. In the solid-state image pickup device according to Japanese Patent Laid-Open No. 4-267211, in a normal image-capturing operation, an image is formed by adding signals from pixels for which directions of relative displacements between the microlenses and the photoelectric conversion units are different from each other. In an operation of calculating a focus position of a taking lens, the focus position of the taking lens is calculated on the basis of a pair of images obtained by pixel columns for which directions of relative displacements between the microlenses and the photoelectric conversion units are different from each other. The focus position of the taking lens is calculated by performing a correlation calculation based on an amount of relative displacement between the pair of images.
In the case where the focus position is calculated in a phase-difference AF (Auto Focus) mode while vignetting is caused by the taking lens, asymmetry of image signals (reduction in the degree of coincidence of the images) is caused by the vignetting due to the taking lens. Accordingly, Japanese Patent Laid-Open No. 5-127074 discloses a technique in which a specific image correction filter is stored in an image pickup device and is deformed on the basis of an aperture ratio, the position of an exit pupil, and an amount of defocus. According to this technique, the image correction filter is applied to the image signals, and then the focus position is calculated. The image correction filter is applied to the image signals by convolution integration. Therefore, the pitch of the image correction filter is set to be equal to the pitch of the image signals.
In the technique of the related art, the pitch of the image correction filter is constant irrespective of the amount of defocus or an F-number. Therefore, in an area near the in-focus position, where a filter length is small, a correct filter shape cannot be obtained because of, for example, aliasing distortion, and accordingly the focus calculation accuracy is reduced.
An object of the present invention is to achieve high-accuracy focus adjustment even when vignetting is caused by a taking lens.